import request from '@/utils/request';

const baseURL = '/energy/analyze';

/**
 * 获取能效分析-重点指标综合分析-表格数据
 * @param params {{timeType:string;time:string;}} 参数
 */
export const indicatorTable = params =>
  request({
    baseURL: `${baseURL}/indicator/table`,
    method: 'GET',
    params
  });

/**
 * 产品单耗分析
 * @param params {{timeType:string;time:string;industryCode:string;}} 参数
 *  */
export const productConsumptionTip = ({ industryCode, timeType, time }) =>
  request({
    baseURL: `${baseURL}/product/consumption/tip/${industryCode} `,
    method: 'GET',
    params: { timeType, time }
  });

/**
 * 产品单耗分析-图表
 * @param params {{timeType:string;time:string;industryCode:string;}} 参数
 *  */
export const productConsumptionTable = ({ industryCode, timeType, time }) =>
  request({
    baseURL: `${baseURL}/product/consumption/table/${industryCode} `,
    method: 'GET',
    params: { timeType, time }
  });
